package com.et114.modules.order.dao;

import java.util.List;

import com.et114.components.simpletable.DataList;
import com.et114.components.simpletable.dao.SimpleTableDAOImpl;
import com.et114.modules.order.vo.OrderTrack;
import com.et114.modules.order.vo.OrderVO;

/**
 * @author zhiweip
 * @version 1.0
 * @created 24-十一月-2010 23:51:43
 */
public class Mng_OrderDaoImp extends SimpleTableDAOImpl implements
		IMng_OrderDao {
	
	/**
	 * 
	 * @param vo
	 */
	public Integer insertOrder ( OrderTrack vo ) {
		return Integer.parseInt ( this.insert ( vo , "insert_ET_ORDER" )
				.toString ( ) );
	}
	
	public Integer insertOrder_Detail ( OrderTrack vo ) {
		return Integer.parseInt ( this.insert ( vo , "insert_et_order_detail" )
				.toString ( ) );
	}
	
	public Integer insertOrderInfo ( OrderTrack info ) {
		return Integer.parseInt ( this.insert ( info , "insert_et_order_info" )
				.toString ( ) );
	}
	
	/**
	 * 
	 * @param vo
	 */
	public int updateOrder ( OrderTrack vo ) {
		return this.update ( vo , "UPDATE_ET_order" );
	}
	
	public int updateOrderDetail ( OrderTrack vo ) {
		return this.update ( vo , "update_et_order_detail" );
	}
	
	public int updateETOrdreInfo ( OrderTrack info ) {
		return this.update ( info , "update_ET_ORDER_INFO" );
	}

	public DataList queryOrderDataList ( OrderTrack vo ) throws Exception { 
		return this.queryListDataList ( vo , "query_ET_ORDER_DataList" );
	}

	public Object loadOrder ( OrderTrack vo ) { 
		return this.load ( vo , "query_Order_track_ByOrderId" );
	}
	public Object loadOrderdetail ( OrderTrack vo ) { 
		return this.load ( vo , "load_Order_detail_ByOrderId" );
	}
	
	
	public Object viewOrder ( OrderTrack vo ) { 
		return this.load ( vo , "view_Order_track_ByOrderId" );
	}

	public List loadOrderDetail ( OrderVO vo ) { 
		return this.queryList ( vo , "query_Order_detail_ByOrderId" );
	}

	public Object loadOrderInfo ( OrderTrack vo ) { 
		return this.load ( vo , "query_Order_info_ByOrderId" );
	}

	public int checkIsSameITEMTYPE ( String [ ] ids ) { 
		OrderVO vo=new OrderVO();
		vo.setOrderids ( ids );
		
		return this.queryList( vo , "checkIsSameITEMTYPE" ).size ( );
	}
	
	public int delete_ET_ORDER_DETAILByKey( OrderTrack vo ){
	return this.delete ( vo , "delete_ET_ORDER_DETAILByKey" );
		
	}
	
	public List rep_order_Emp ( OrderTrack vo ) throws Exception { 
		return this.queryList( vo , "rep_order_Emp" );
	}
	
	public List rep_order_Sup ( OrderTrack vo ) throws Exception { 
		return this.queryList( vo , "rep_order_Sup" );
	}
	
	public List getOrd_ProSuppliers ( com.et114.modules.products.supplier.vo.ProSuppliers vo ) throws Exception { 
		return this.queryList( vo , "getOrd_ProSuppliers" );
	}
	public int update_Pub_CustIntegral_By_order ( OrderTrack vo ) {
		return this.update ( vo , "update_Pub_CustIntegral_By_order" );
	}
	
}